package routers

import (
	"github.com/gin-gonic/gin"
	"wj-go-web/config"
	"wj-go-web/controller/user"
	"wj-go-web/middlerwares"
)

func RegisterUser(r *gin.Engine) {

	r.Use(config.LoggerMiddleware())
	r.Use(config.Log())

	userRouter := r.Group("/user", middlerwares.InitMiddleware)
	{
		userRouter.GET("/get", user.UserController{}.Index)
		userRouter.GET("/delete", user.UserController{}.Index)
		userRouter.POST("/add", user.UserController{}.Index)
	}
}
